Computes the minimum value of a view of nullable Int64 values that are obtained
by invoking a transform function on each element of the source view.
Namespace:
C1.LiveLinqAssembly: C1.Silverlight.LiveLinq (in C1.Silverlight.LiveLinq.dll)
Syntax
C# |
---|
public static AggregationView<TSource, Nullable<long>> LiveMin<TSource>( this View<TSource> source, Expression<Func<TSource, Nullable<long>>> selector ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function LiveMin(Of TSource) ( _ source As View(Of TSource), _ selector As Expression(Of Func(Of TSource, Nullable(Of Long))) _ ) As AggregationView(Of TSource, Nullable(Of Long)) |
Parameters
- source
- Type: C1.LiveLinq.LiveViews..::..View<(Of <(<'TSource>)>)>
A view containing the values to determine the minimum value of.
- selector
- Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TSource, Nullable<(Of <(<'Int64>)>)>>)>)>>)>)>
A transform function to apply to each element.
Type Parameters
- TSource
- The type of the elements of source.
Return Value
A view representing the minimum of the values.Remarks
If the source is empty or contains only nulls, the minimum value is null.
It is possible to use standard LINQ query operator Min instead of LiveMin. Both are "live" in the sense that they are recomputed automatically when any change occurs in the source. The difference is that Min will every time loop through the entire source collection and aggregate it from scratch, whereas LiveMin will use a more performant algorithm, will maintain its value incrementally, processing only those source items that actually changed.